﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="RevenueChart.ascx.cs" Inherits="Admin_Components_Report_RevenueChart" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register TagPrefix="Web" Namespace="WebChart" Assembly="WebChart" %>

<telerik:RadScriptManager ID="ScriptManager2" runat="server" EnableTheming="True">
</telerik:RadScriptManager>

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <telerik:RadTabStrip ID="TabStrip1" runat="server" EnableDragToReorder="true" Skin="Vista" MultiPageID="RadMultiPag1" >
            <Tabs>
                 <telerik:RadTab Text="XEM THEO CỬA HÀNG" Selected="True">
                </telerik:RadTab>
                <telerik:RadTab Text="XEM THEO SẢN PHẨM" >
                </telerik:RadTab>
            </Tabs>
        </telerik:RadTabStrip>
       
        <telerik:RadMultiPage ID="RadMultiPag1" runat="server" SelectedIndex="0">
            <!--Tab xem theo shop -->
            <telerik:RadPageView ID="RadPageView1" runat="server" Height="210px" Style="overflow: hidden">
                 <fieldset class="form" id="fsGeneral">
                     <br />
               <div class="form-horizontal wrapper-center clearfix">
                <!--Block bên trái -->
                 <div class="form-group col-md-6">
                     <div class="form-group">
                    <label class="col-md-4 control-label">Xem theo</label>
                    <div class="col-md-8">
                        <telerik:RadComboBox ID="cboViewShopType" runat="server" CssClass="col-imp-8">  
                        <Items>   
                            <telerik:RadComboBoxItem runat="server" Text="Doanh thu theo cửa hàng" Value="s" />   
                             <telerik:RadComboBoxItem runat="server" Text="Doanh thu theo tháng" Value="m" />   
                        </Items>
                        </telerik:RadComboBox>
                    </div>
                    </div>
                     <div class="form-group">
                    <label class="col-md-4 control-label">Tỉnh thành</label>
                    <div class="col-md-8">
                        <telerik:RadComboBox ID="cboProvince" runat="server" CssClass="col-imp-8" OnSelectedIndexChanged="cboProvince_SelectedIndexChanged" AutoPostBack="true">  
                        </telerik:RadComboBox>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-4 control-label">Cửa hàng</label>
                        <div class="col-md-8">
                           <telerik:RadComboBox ID="cboShop" runat="server" CssClass="col-imp-8"  />
                         </div>
                    </div>
                </div>
                 <!--End Block bên trái -->
                 <!--Block bên phải -->
                <div class="form-group col-md-6">
                      <div class="form-group">
                        <label class="col-md-3 control-label">
                            Từ ngày</label>
                        <div class="col-md-8">
                        <telerik:RadDatePicker ID="dtpFromDate" cssclass="col-imp-8" enabled="true" runat="server">
                            <Calendar ID="Calendar1" runat="server" EnableKeyboardNavigation="true" ViewSelectorText="x" Skin="Hay" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False">
                            </Calendar>
                            <DateInput ToolTip="Từ ngày" style="width:100px" DisplayDateFormat="dd/MM/yyyy" DateFormat="dd/MM/yyyy"></DateInput>
                        </telerik:RadDatePicker>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            Đến ngày</label>
                        <div class="col-md-8">
                        <telerik:RadDatePicker ID="dtpToDate" cssclass="col-imp-8" enabled="true" runat="server">
                            <Calendar ID="Calendar2" runat="server" EnableKeyboardNavigation="true" ViewSelectorText="x" Skin="Hay" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False">
                            </Calendar>
                            <DateInput ToolTip="Đến ngày" style="width:100px" DisplayDateFormat="dd/MM/yyyy" DateFormat="dd/MM/yyyy"></DateInput>
                        </telerik:RadDatePicker>
                        </div>
                    </div>
                </div>
                 <!--End Block bên phải -->
                
                </div>
                <!--Action-->
                <div class="set-btns text-center">
                    <asp:Button ID="btnSearchForShop" CssClass="btn btn-sm btn-primary" runat="server" Text="Xem" OnClick="btnSearchForShop_Click"/>
                   <%-- <asp:Button ID="btnExportExcel" runat="server" CssClass="btn btn-sm btn-primary" Text="Xuất Excel" OnClick="btnExportExcel_Click"/>--%>
                </div>
            </fieldset>
            </telerik:RadPageView>
            <telerik:RadPageView ID="RadPageView2" runat="server" Height="210px" Style="overflow: hidden">
                 <fieldset class="form" id="Fieldset1">
                     <br />
               <div class="form-horizontal wrapper-center clearfix">
                <!--Block bên trái -->
                 <div class="form-group col-md-6">
                     <div class="form-group">
                    <label class="col-md-4 control-label">Xem theo</label>
                    <div class="col-md-8">
                        <telerik:RadComboBox ID="cboViewProductType"  runat="server" CssClass="col-imp-8">  
                        <Items>   
                            <telerik:RadComboBoxItem runat="server" Text="Trọng lượng theo sản phẩm" Value="p" />   
                             <telerik:RadComboBoxItem runat="server" Text="Trọng lượng theo tháng" Value="pm" />   
                        </Items>
                        </telerik:RadComboBox>
                    </div>
                    </div>
                     <div class="form-group">
                    <label class="col-md-4 control-label">Tỉnh thành</label>
                    <div class="col-md-8">
                        <telerik:RadComboBox ID="cboProvince_P" runat="server" CssClass="col-imp-8" OnSelectedIndexChanged="cboProvince_SelectedIndexChanged" AutoPostBack="true">  
                        </telerik:RadComboBox>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-4 control-label">Cửa hàng</label>
                        <div class="col-md-8">
                           <telerik:RadComboBox ID="cboShop_P" runat="server" CssClass="col-imp-8"  />
                         </div>
                    </div>
                </div>
                 <!--End Block bên trái -->
                 <!--Block bên phải -->
                <div class="form-group col-md-6">
                <div class="form-group">
                <label class="col-md-3 control-label">Sản phẩm</label>
                <div class="col-md-8">
                    <telerik:RadComboBox ID="cboProduct" runat="server" CssClass="col-imp-8"  filter="Contains"/>
                    </div>
                </div>
                <div class="form-group">
                <label class="col-md-3 control-label">
                    Từ ngày</label>
                <div class="col-md-8">
                <telerik:RadDatePicker ID="dtpFromDate_P" cssclass="col-imp-8" enabled="true" runat="server">
                    <Calendar ID="Calendar3" runat="server" EnableKeyboardNavigation="true" ViewSelectorText="x" Skin="Hay" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False">
                    </Calendar>
                    <DateInput ToolTip="Từ ngày" style="width:100px" DisplayDateFormat="dd/MM/yyyy" DateFormat="dd/MM/yyyy"></DateInput>
                </telerik:RadDatePicker>
                </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-3 control-label">
                            Đến ngày</label>
                        <div class="col-md-8">
                        <telerik:RadDatePicker ID="dtpToDate_P" cssclass="col-imp-8" enabled="true" runat="server">
                            <Calendar ID="Calendar4" runat="server" EnableKeyboardNavigation="true" ViewSelectorText="x" Skin="Hay" UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False">
                            </Calendar>
                            <DateInput ToolTip="Đến ngày" style="width:100px" DisplayDateFormat="dd/MM/yyyy" DateFormat="dd/MM/yyyy"></DateInput>
                        </telerik:RadDatePicker>
                        </div>
                    </div>
                </div>
                 <!--End Block bên phải -->
                
                </div>
                <div class="set-btns text-center">
                    <asp:Button ID="btnSearchForProduct" CssClass="btn btn-sm btn-primary" runat="server" Text="Xem" OnClick="btnSearchForProduct_Click"/>
                   <%-- <asp:Button ID="btnExportExcel" runat="server" CssClass="btn btn-sm btn-primary" Text="Xuất Excel" OnClick="btnExportExcel_Click"/>--%>
                </div>
            </fieldset>
            </telerik:RadPageView>
        </telerik:RadMultiPage>
       
        <div class="row text-center">
              <asp:Label runat="server" ID="lblAlert" Visible="false"></asp:Label>
              <Web:ChartControl ID="ChartControl1" runat="server" BorderStyle="None" BorderWidth="2px"
                 Width="800px" HasChartLegend="False" Height="700px" ChartPadding="50" LeftChartPadding="20" 
                 TopPadding="40" Padding="20">
         
                 <YAxisFont StringFormat="Far,Near,Character,LineLimit" Font="Tahoma, 8pt, style=Bold" />
                 <XTitle StringFormat="Center,Near,Character,LineLimit" Font="Tahoma, 10pt, style=Bold" />
                 <ChartTitle  StringFormat="Center,Near,Character,LineLimit" Font="Arial, 14pt, style=Bold" />
                 <XAxisFont StringFormat="Center,Near,Character,LineLimit" Font="Tahoma, 8pt, style=Bold" />
                 <Background   Color="LightSteelBlue"  CenterColor="DimGray" EndPoint="200, 100" HatchStyle="DottedGrid" />
                 <YTitle StringFormat="Center,Near,Character,DirectionVertical" Font="Tahoma, 10pt, style=Bold" />
                 <Legend Width="150"></Legend>
             </Web:ChartControl>
        </div>
    </ContentTemplate>
<Triggers>
    <asp:PostBackTrigger ControlID="btnSearchForShop"/>
    <asp:PostBackTrigger ControlID="btnSearchForProduct"/>
</Triggers>
</asp:UpdatePanel>
<div class="progressbar">
    <asp:UpdateProgress ID="up" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
        <ProgressTemplate>
            <div class="bg">
                <div class="progress progress-striped active">
                    <div class="progress-bar" role="progressbar" aria-valuenow="45" aria-valuemin="0"
                        aria-valuemax="100" style="width: 100%">
                        <span class="sr-only">100% Complete</span>
                    </div>
                </div>
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
</div>
